package org.luxor.cloud.portal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.cloud.portal.entity.TenantDetailsEntity;
import org.luxor.cloud.portal.mapper.TenantDetailsMapper;
import org.luxor.cloud.portal.service.ITenantDetailsService;
import org.luxor.commons.core.utils.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 租户详情
 *
 * @author administrator @date 2020-10-29 14:22:21
 */
@Service("tenantDetailsService")
public class TenantDetailsServiceImpl extends ServiceImpl<TenantDetailsMapper, TenantDetailsEntity> implements ITenantDetailsService {

    @Override
    public IPage<TenantDetailsEntity> page(IPage<TenantDetailsEntity> page, Map query) {
        TenantDetailsEntity queryEntity = BeanUtils.toObject(TenantDetailsEntity.class, query);
        return super.page(page, Wrappers.query(queryEntity));
    }
}
